pub trait AbstractPerson {
    fn prepare_go_to_school(&self) {
        self.dress();
        self.eat();
        self.take_things();
    }

    fn dress(&self);
    fn eat(&self);
    fn take_things(&self);
}

pub struct Student;
impl AbstractPerson for Student {
    fn dress(&self) {
        println!("穿校服");
    }

    fn eat(&self) {
        println!("吃妈妈做的早饭");
    }

    fn take_things(&self) {
        println!("背书包");
    }
}

pub struct Teacher;
impl AbstractPerson for Teacher {
    fn dress(&self) {
        println!("穿工作服");
    }

    fn eat(&self) {
        println!("吃自己做的早饭");
    }

    fn take_things(&self) {
        println!("背上工作包");
    }
}